<#list mapping.modules as module><#t/>
<#list module.entities as entity><#t/>
drop table ${entity.table};

</#list><#t/>
</#list><#t/>

<#list mapping.modules as module><#t/>
<#list module.entities as entity><#t/>
<#list entity.keyProperties as property><#t/>
<#if property.hasSequence><#t/>
drop sequence ${property.sequence};

</#if><#t/>
</#list><#t/>
</#list><#t/>
</#list><#t/>

<#list mapping.modules as module><#t/>
<#list module.entities as entity><#t/>
create table ${entity.table} (
<#list entity.properties as property><#t/>
	${property.columnName} ${property.dbOracleType}<#if property.notNull> not null</#if>,
</#list><#t/>
	primary key (${entity.keyColumns})
);

</#list><#t/>
</#list><#t/>

<#list mapping.modules as module><#t/>
<#list module.entities as entity><#t/>
<#list entity.keyProperties as property><#t/>
<#if property.hasSequence><#t/>
create sequence ${property.sequence};

</#if><#t/>
</#list><#t/>
</#list><#t/>
</#list><#t/>

<#list mapping.modules as module><#t/>
<#list module.entities as entity><#t/>
comment on table ${entity.table} is '${entity.comment}';
<#list entity.properties as property><#t/>
comment on column ${entity.table}.${property.columnName} is '${property.comment}';
</#list><#t/>

</#list><#t/>
</#list><#t/>


